﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Confirm
    </h2>
    <p>
        <%=ViewData["msg"] %></p>
    
    <%--<%=Html.Confirm(new ConfirmParams { Message = "do you?"})%>--%>
    <%=Html.Confirm("asfa")%>
    
    <form action="<%=Url.Action("Ido") %>">
    <input type="submit" value="do" class="confirm" />
    </form>
    
    <br />
    <h2>
        Popup Form</h2>
    <%=Html.MakePopupForm(new MakePopupFormParams { Action = "PopupForm", Parameters = new[]{"country","hobby"},Width = 500, Height = 400, Title = "lookup and ajax dropdown" })%>
    <%=Html.PopupFormActionLink(new PopupActionLinkParams { Action = "PopupForm", Text = "popup form", Parameters = new object[] { 2, 1 } })%>
    <br />
    <%=Html.MakePopupForm(new MakePopupFormParams { Action = "Hi", Height = 200, SuccessFunction = "hey" })%>
    <script type="text/javascript">
        function hey(o) {
            alert('hi ' + o.name);
        }
    </script>
    <%=Html.PopupFormActionLink(new PopupActionLinkParams { Action = "Hi" })%>
    <h2>
        Ajax Dropdown</h2>
    <%=Html.AjaxDropdown(new AjaxDropdownParams{Prop="Hobby", Prefix = "m"}) %>
    <h2>
        Lookup</h2>
    <%=Html.Lookup(new LookupParams { Prop = "Country", Prefix = "m", Height = 300, Width = 400 })%>
    <br />
    <h2>
        Autocomplete</h2>
    Hobby:
    <%=Html.Autocomplete(new AutocompleteParams { Prop = "HobbyA", Controller = "HobbyAutocomplete", Delay = 0 })%>
    (try typing one letter: 'a', 'o', 'e')
    <h2>
        Pager
    </h2>
    <%=Html.ActionLink("pager","index", "PagerDemo") %>
    <h2>
        Popup</h2>
    <%=Html.MakePopup(new MakePopupParams() { Action = "SayHi" })%>
    <%=Html.PopupActionLink(new PopupActionLinkParams { Action = "SayHi" })%>
    <h2>
        Ajax Radio List</h2>
    <%=Html.AjaxRadioList(new AjaxRadioListParams { Prop = "Fruit" })%>
    <h2>
        Ajax CheckBox List</h2>
    <%=Html.AjaxCheckBoxList(new AjaxCheckBoxListParams() { Prop = "Fruits" })%>
</asp:Content>
